<script type="text/javascript">
    var current = 'main';
    
    function changeBox(new_id){
    	if(current != new_id){
    	    Element.hide('mainbox-' + current);
    		new Effect.Appear('mainbox-' + new_id);
    		current = new_id;
    	}
    	
    	document.cookie = "tab="+new_id;
    	return false;
    }
</script>

<!-- TODO: add session check here and change to logout if already logged in -->
<div id="user_status" align="center">
   
	<table cellpadding="14">
	   <tr >
	     
	     
	     <td align="center" >
	        <% if @session['user'] %>
           	       <a href="/account/logout/" style="font-size: 13px;font-weight: bold;">Log Out</a>&nbsp;|
           	       <a href="/account/settings/" style="font-size: 13px;font-weight: bold;">Settings</a>
            <% else%>
        	       <a href="" onclick="return changeBox('login')" style="font-size: 13px;font-weight: bold;">Log In</a>&nbsp;|
        	       <a href="/account/signup/" style="font-size: 13px;font-weight: bold;">Sign-up</a>
        	<% end %>
         </td>
       </tr>
    </table>
</div>
<br>

<a href="/overview.rhtml" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu1')">Overview</a> | 
<a href="/aboutus.rhtml" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu2')">Diabetics</a> | 
<a href="/livestats.rhtml" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu3')">Doctors</a> |
<a href="/aboutus.rhtml" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu4')">Researchers</a> | 
<a href="/livestats.rhtml" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu5')">Donors</a> |
<a href="/livestats.rhtml" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu6')">Collaborate</a> |
<a href="/livestats.rhtml" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, 'anylinkmenu7')">LIVE stats!</a>

<div id="anylinkmenu1" class="anylinkcss">
    <a href="">About Dsolve</a>
    <a href="">Who We Are</a>
    <a href="">Features</a>
    <a href="">User's Guide</a>
    <a href="">Sitemap</a>
    <a href="">Terms of Use</a>
    <a href="">Privacy Policy (HIPAA)</a>
</div>

<div id="anylinkmenu2" class="anylinkcss">
    <a href="">Diabetics Overview</a>
    <a href="">Enter Data</a>
    <a href="">Upload Meter Data</a>
    <a href="">Generate Reports</a>
    <a href="">Share Data with Doctor</a>
</div>

<div id="anylinkmenu3" class="anylinkcss">
    <a href="">Doctors Overview</a>
    <a href="">Invite Patient</a>
    <a href="">View Patients</a>
</div>

<div id="anylinkmenu4" class="anylinkcss">
    <a href="">Researchers Overview</a>
    <a href="">View Current Studies</a>
    <a href="">View Past Studies</a>
    <a href="">Request a New Study</a>
    <a href="">Find Participants</a>
</div>

<div id="anylinkmenu5" class="anylinkcss">
    <a href="">Donors Overview</a>
    <a href="">Make a Donation</a>
    <a href="">View Studies Awating Funding</a>
</div>

<div id="anylinkmenu6" class="anylinkcss">
    <a href="">Share and Discuss Reports</a>
    <a href="">Share and Discuss Research</a>
    <a href="">Community Resources</a>
    <a href="">Other Resources</a>
</div>

<div id="anylinkmenu7" class="anylinkcss">
    <a href="">Stats by Age</a>
    <a href="">Stats by Region</a>
    <a href="">Stats by Sex</a>
</div>

<br>
<hr />
